package cn.tedu.micro.demo.device.controller;

import cn.tedu.micro.demo.common.pojo.protocol.JsonResult;
import cn.tedu.micro.demo.common.pojo.vo.GunInfoVO;
import cn.tedu.micro.demo.device.service.GunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GunController {
    @Autowired
    private GunService  gunService;

    @GetMapping("/device/gun/info/{gunId}")
    public JsonResult<GunInfoVO> detail(@PathVariable Long gunId) {
        GunInfoVO  vo = gunService.detail(gunId);
        return JsonResult.ok("查询成功",vo);
    }

}
